{% load nav_menu %}
<li class="{% if item.is_current %}on {% endif %}{% if item.always_visible %}always_visible{% endif %}">
    <a href="{{ item.link }}">{{ item.name }}</a>
    {% with item.get_children as children %}
    {% with item.get_always_visible as visible_children %}

    {% if children or visibile_children %}
        <ul>
            {% if not item.is_current %}
                {% for child in visible_children %}{% navitem child %}{% endfor %}
    {% else %}
        {% for child in item.get_children %}{% navitem child %}{% endfor %}
    {% endif %}
    </ul>
    {% endif %}

    {% endwith %}
    {% endwith %}
</li>
